07. androidTest vs. Test

L5 A05 AndroidTest Vs. Test V3

Instrumented tests are in the androidTest source set.

  1. Open up the androidTest source set
  2. Run the test called ExampleInstrumentedTest

Unlike the local test, the test runs on a device (in the example below an emulated Pixel 2 phone):

If you have a device attached or an emulator running, you should actually see the test run on the emulator.


Quiz

Below is the 'Welcome to Testing' Video posted again for your convenience to answer a question in the following quiz.

L5 A01 Welcome To Testing V3

In the Welcome to Testing video above, there was an example of a test running. Do you know which source set that test was in?

SOLUTION: androidTest

Below there is an image that you will answer a question about in the following quiz.

From the image above of the run configuration dialog, can you identify which test will be run locally?

SOLUTION: TasksViewModelTest